package cn.edu.just.firstjavaapp.l14.exception;

import java.util.Date;

public class Main03 {
    public static void main(String[] args) {
        try {
            f1();
        }catch (ArithmeticException e){
            System.out.println("在main里处理了异常");
        }

    }

    private static void f1() {

        f2();
    }

    private static void f2() {

            f3();

    }

    private static void f3() {

            System.out.println("enter into f3");
            int a = 10 / 0;  //异常的反向传播
            Date now = null;
            System.out.println(now.getMonth()+1);
            System.out.println("code in f3");
            System.out.println("exit from f3");

    }
}
